﻿using System.Linq;

namespace Magellan.Routing
{
    public static class PathSplitter
    {
        public static string[] SplitUrlPath(this string path)
        {
            if (string.IsNullOrEmpty(path)) return new string[0];
            return path 
                .Split('/', '\\')
                .Where(x => x.Length > 0)
                .ToArray();
        }
    }
}
